package com.itkaien.javaeebased.singleton;

public class SingletonHungry {

    private static SingletonHungry singletonHungry = new SingletonHungry();

    private SingletonHungry()
    {

    }

    public static SingletonHungry getInstance()
    {
        return singletonHungry;
    }

    public void show()
    {
        System.out.println("hungry");
    }

    public static void main(String[] args)
    {
        SingletonHungry singletonHungry = SingletonHungry.getInstance();
        SingletonHungry singletonHungry1 = SingletonHungry.getInstance();
        System.out.println(singletonHungry == singletonHungry1);
    }


}
